﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html>

<head>
    <title>@HY.Common.SystemConst.Website.Title</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8" />
    <link rel="icon" href="/favicon.ico">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
    <style type="text/css">
        ::-moz-placeholder {
            color: #7792b3;
        }

        :-ms-input-placeholder {
            color: #7792b3;
        }

        ::-webkit-input-placeholder {
            color: #7792b3;
        }

        body {
            margin: 0;
            width: 100%;
            height: 100%;
            background-image: url(/home/login_img.jpg);
        }

        .page-login .contant {
            width: 780px;
            display: block;
            position: relative;
            z-index: 10;
            margin: 110px auto 0;
            overflow: hidden;
            padding-bottom: 50px;
        }

            .page-login .contant .bg {
                position: absolute;
                top: 0;
                left: 0;
                width: 780px;
                height: 100%;
                opacity: 0.1;
                z-index: -1;
                pointer-events: none;
            }

            .page-login .contant .title {
                width: 780px;
                margin: 100px auto 60px;
                text-align: center;
                font-size: 4em;
                color: white;
            }

            .page-login .contant .box {
                width: 380px;
                min-height: 385px;
                margin: 0 auto;
            }

                .page-login .contant .box .inputs input {
                    width: 100%;
                    height: 50px;
                    display: block;
                    box-sizing: border-box;
                    background: rgba(0, 0, 0, 0.3);
                    font-size: 18px;
                    color: #fff;
                    border: 0;
                    padding: 0px 0 0 20px;
                    line-height: 1;
                }

                .page-login .contant .box .inputs .user,
                .page-login .contant .box .inputs .pass {
                    position: relative;
                    margin-bottom: 20px;
                }

                .page-login .contant .box .inputs .btn {
                    background: #4499ff;
                    color: #fff;
                    font-size: 22px;
                    padding-left: 0;
                    margin-top: 30px;
                    margin-bottom: 30px;
                    cursor: pointer;
                }

                .page-login .contant .box .inputs input:focus {
                    border: 1px solid #fff;
                }

        .page-footer {
            color: #4c89a1;
            font-size: 12px;
            line-height: 22px;
            text-align: center;
            padding: 60px 0;
            letter-spacing: 1px
        }

        input:-webkit-autofill {
            -webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0) inset;
        }
    </style>
</head>

<body>
    <div id="container">
        <div class="page-login">
            <div class="contant">
                <div class="bg">
                </div>
                <div class="title">
                    @HY.Common.SystemConst.Website.Title
                </div>
                <div class="box">
                    <form class="layui-form">
                        <div class="inputs">
                            <div class="user">
                                <input type="text" name="username" placeholder="请输入用户名" autocomplete="off"
                                       lay-verify="required" class="layui-input">
                            </div>
                            <div class="pass">
                                <input type="password" name="password" placeholder="请输入密码" autocomplete="off"
                                       lay-verify="required" class="layui-input">
                            </div>
                            <!-- <div class="verification">
                                <input type="text" name="validateCode" id="validateCode" placeholder="请输入验证码" autocomplete="off" lay-verify="required" class="layui-input">
                                <span class="img">
                                    <img class="admin-captcha" style="cursor: pointer;" src="#" title="看不清，点击换一张" />
                                </span>
                            </div> -->
                            <input type="button" value="登录" id="submit" class="btn" lay-submit lay-filter="login" />
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!--  版权 -->
        <div class="page-footer"><a href="javascript:void(0);" style="color:#fff;">中储恒科物联网系统有限公司</a></div>
        <!--  版权 end-->
    </div>
</body>

</html>
<script>
    layui.use(function () {
        var form = layui.form;
        var $ = layui.jquery;
        form.on("submit(login)", function (formdata) {
            $.post("/Home/Login", formdata.field, function (res) {
                if(res.Code==200) location.href = "/";
                else layer.msg(res.Message);
            })
            return false;
        })
        $('body').on('keydown', function (event) {
            if (event.keyCode == 13) {
                $("#submit").trigger("click");
                return false
            }
        });
    })
</script>
